<?php
require_once './exception/FileTypeOrDataErrorException.php';
require_once './init.php';

use exception\FileTypeOrDataErrorException;

move_uploaded_file($_FILES['upload-hide2']["tmp_name"],"./upload/" . 'excel2.xlsx');
header('Content-Type:application/json; charset=utf-8');

// 检查文件格式

if('xlsx' != pathinfo($_FILES['upload-hide2']['name'],PATHINFO_EXTENSION)){
    throw new FileTypeOrDataErrorException();
}
echo json_encode([
	'code'	=>		'40000'
]);